/* @(#)GSBargainEffectAction.java    V0.1
 *
 * Project: GSdevelop
 *
 * Modify Information:
 * =============================================================================
 *   Author       Date       Description
 *   ------------ ---------- ---------------------------------------------------
 *   owen         2006-4-25
 *
 * Copyright Notice:
 * =============================================================================
 *    Copyright (c) 2001-2006 Beijing HiTRUST Technology Co., Ltd. 1808 Room, 
 *        Science & Technology Building, No. 9 South Street, Zhong Guan Cun, 
 *        Haidian District, Beijing ,100081, China All rights reserved.
 *
 *    This software is the confidential and proprietary information of
 *        Beijing HiTRUST Technology Co., Ltd. ("Confidential Information").
 *        You shall not disclose such Confidential Information and shall use it
 *        only in accordance with the terms of the license agreement you entered
 *        into with HiTRUST.
 *
 * Warning:
 * =============================================================================
 * 
 */
package com.hitrust.gs.action;

import com.hitrust.gs.business.GSBargainProcessor;
import com.hitrust.gs.form.GSBargainQueryForm;
import com.hitrust.gs.lib.GSBaseConstants;
import com.hitrust.gs.service.GSBaseAction;
import com.hitrust.gs.service.GSBaseForm;

/**
 * 修改合同为无效
 */
public class GSBargainEffectAction extends GSBaseAction{

    
    public String execute(GSBaseForm aForm) throws Exception {
        GSBargainQueryForm tForm = (GSBargainQueryForm)aForm;
        try{
            String[] tEffectSerial = tForm.getGs_bgc_effectserial();
            for(int i=0;i<tEffectSerial.length;i++){
                GSBargainProcessor.modifyBargainEffectTask("2",tEffectSerial[i]);
            }
      
            aForm.getRequest().setAttribute("gs_bgn_department",tForm.getGs_bgn_department());
            aForm.getRequest().setAttribute("gs_bgn_signuser",tForm.getGs_bgn_signuser());
            aForm.getRequest().setAttribute("gs_bgn_userid",tForm.getGs_bgn_userid());
            aForm.getRequest().setAttribute("gs_bgn_vol",tForm.getGs_bgn_vol());
            aForm.getRequest().setAttribute("gs_bgn_serial",tForm.getGs_bgn_serial());
            aForm.getRequest().setAttribute("gs_bgn_term",tForm.getGs_bgn_term());
            aForm.getRequest().setAttribute("gs_bgn_number",tForm.getGs_bgn_number());
            aForm.getRequest().setAttribute("gs_bgn_filenumber",tForm.getGs_bgn_filenumber());
            aForm.getRequest().setAttribute("gs_bgn_effect",tForm.getGs_bgn_effect());
            aForm.getRequest().setAttribute("gs_bgn_content",tForm.getGs_bgn_content());
            aForm.getRequest().setAttribute("startsigndate",tForm.getStartsigndate());
            aForm.getRequest().setAttribute("endsigndate",tForm.getEndsigndate());
            aForm.getRequest().setAttribute("startenddate",tForm.getStartenddate());
            aForm.getRequest().setAttribute("stopenddate",tForm.getStopenddate());
            aForm.getRequest().setAttribute("startreturneddate",tForm.getStartreturneddate());
            aForm.getRequest().setAttribute("endreturneddate",tForm.getEndreturneddate());
            aForm.getRequest().setAttribute("maintype",tForm.getMaintype());
            aForm.getRequest().setAttribute("onenddate",tForm.getOnenddate());
            
            aForm.getRequest().setAttribute("requery","true");
            
        }
        catch(Exception e){
            tForm.getRequest().setAttribute("action","A170201.do");
            throw e;
        }
        return GSBaseConstants.FORWARD_SUCCESS;
    }

}
